<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="../../css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<div class="layui-form layuimini-form">
    <!-- 真实姓名-->
    <div class="layui-form-item">
        <label class="layui-form-label required">真实姓名</label>
        <div class="layui-input-block">
            <input type="text" name="realname"  value="张三" class="layui-input" disabled>
        </div>
    </div>
    <!-- 用户 -->
    <div class="layui-form-item">
        <label class="layui-form-label required">用户ID</label>
        <div class="layui-input-block">
            <input type="text" name="userid" value="1" class="layui-input" readonly>
        </div>
    </div>
    <!-- 角色 -->
    <div class="layui-form-item">
        <label class="layui-form-label">角色</label>
        <div class="layui-input-block">
            <select name="interest" lay-filter="role" >
                <option value=""></option>
                <option value="1">超级管理员</option>
                <option value="2">管理员</option>
                <option value="3" selected>普通用户</option>
            </select>
            <tip>选择你的账号身份</tip>
        </div>
    </div>
    <!--启用状态 -->
    <div class="layui-form-item">
        <label class="layui-form-label required">启动状态</label>
        <div class="layui-input-block">
            <input type="radio" name="status" value="1" title="启用" checked="" disabled>
            <input type="radio" name="status" value="0" title="禁用" disabled>
        </div>
    </div>
    <!-- 院系 -->
    <div class="layui-form-item">
        <label class="layui-form-label">院系</label>
        <div class="layui-input-block">
            <select name="college" lay-filter="college" disabled>
                <option value=""></option>
                <option value="1">计算机科学与技术学院</option>
                <option value="2" selected>机械学院</option>
                <option value="3">化学学院</option>
            </select>
        </div>
    </div>
    <!-- 专业 -->
    <div class="layui-form-item">
        <label class="layui-form-label">专业</label>
        <div class="layui-input-block">
            <select name="major" lay-filter="major" disabled>
                <option value=""></option>
                <option value="1">计算机科学与技术</option>
                <option value="2" selected>软件工程</option>
                <option value="3" selected>智能科学与技术</option>
            </select>
        </div>
    </div>
    <!-- 班级 -->
    <div class="layui-form-item">
        <label class="layui-form-label">班级</label>
        <div class="layui-input-block">
            <select name="class" lay-filter="class" disabled>
                <option value=""></option>
                <option value="1">计算机一班</option>
                <option value="2" selected>计算机二班</option>
                <option value="3">计算机三班</option>
            </select>
        </div>
    </div>
    <!-- 校内职务 -->
    <div class="layui-form-item">
        <label class="layui-form-label required">校内职务</label>
        <div class="layui-input-block">
            <input type="text" name="username"  placeholder="请输入校内职务" value="" class="layui-input">
        </div>
    </div>
    <!-- 入学年份 -->
    <div class="layui-form-item">
        <label class="layui-form-label required">入学年份</label>
        <div class="layui-input-block">
            <input id="date" type="text" name="year" value="2018" class="layui-input" readonly>
        </div>
    </div>
    <!-- 校内职务 -->
    <div class="layui-form-item">
        <label class="layui-form-label required">校内职务</label>
        <div class="layui-input-block">
            <input type="text" name="username"  value="班长" class="layui-input">
        </div>
    </div>
    <!-- 手机号码 -->
    <div class="layui-form-item">
        <label class="layui-form-label required">手机</label>
        <div class="layui-input-block">
            <input type="number" name="phone"  value="15632785666" class="layui-input">
        </div>
    </div>
    <!-- qq号码 -->
    <div class="layui-form-item">
        <label class="layui-form-label">QQ</label>
        <div class="layui-input-block">
            <input type="qq" name="qq"  value="2934498799" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注信息</label>
        <div class="layui-input-block">
            <textarea name="remark" class="layui-textarea" placeholder="请输入备注信息">123456</textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
            <button class="layui-btn layui-btn-danger" lay-submit lay-filter="resetPwd">重置密码</button>
        </div>
    </div>
</div>
<script src="../../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script>
    layui.use(['form','laydate'], function () {
        var form = layui.form,
            layer = layui.layer,
            laydate = layui.laydate
        $ = layui.$;
        //年选择器
        laydate.render({
            elem: '#date'
            ,type: 'year',
        });


        //监听重置密码
        form.on('submit(resetPwd)', function (data) {
            console.log(data)
            console.log(data.field)
            console.log(data.field.password )

            return false;
        });

    });
</script>
</body>
</html>